Strict
Import mojo
Import agfx

Class TScoreTable

	Field result:String=""
	Field game_name:String="TEST_GAME"
	Field call_php_to_write:String="http://monkey.intelligentdevelopment.sk/games/cubes_games_score.php"
	Field call_php_to_load:String="http://monkey.intelligentdevelopment.sk/games/cubes_games_score_list.php"

	Method New(gname:String="TEST_GAME")		
		Self.game_name=gname
	End Method

	Method SaveScore:Void(player_name:String,score_game:Int)
		
		Print ("Save score ...")
		Local scoreString:String = Self.call_php_to_write+"?game="+Self.game_name+"&player="+player_name+"&score="+score_game
		Self.HttpGet( scoreString )

	End Method
	
	Method LoadScore:Void()
		
		Print ("Load score ...")
		Local scoreString:String = Self.call_php_to_load
		Self.result = Self.HttpGet( scoreString )	
		
	End Method
	
	
End Class